﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data;

/// <summary>
/// Summary description for BUS_Class
/// </summary>
public class BUS_Class : DAL_Class
{
    DataTable dtC = new DataTable();

    public DataTable Class_getAllData()
    {
        try
        {
            dtC = DAL_Class_getAllData();
        }
        catch
        {
        }
        return dtC;
    }
    public Boolean Class_addtodel(int id)
    {
        try
        {
            DAL_Class_addtodel(id);
        }
        catch
        {
            return false;
        }
        return true;
    }
    public Boolean Class_del()
    {
        try
        {
            DAL_Class_del();
        }
        catch
        {
            return false;
        }
        return true;
    }
    public DataTable Class_getMaxId()
    {
        try
        {
            dtC = DAL_Class_getMaxId();
        }
        catch
        {
        }
        return dtC;
    }
    public DataTable Class_getAllById(int id)
    {
        try
        {
            dtC = DAL_Class_getAllById(id);
        }
        catch
        {
        }
        return dtC;
    }
    public DataTable Class_getAllByClassid(string cid)
    {
        try
        {
            dtC = DAL_Class_getAllByClassid(cid);
        }
        catch
        {
        }
        return dtC;
    }
    //moi them
    public DataTable Class_getData()
    {
        try
        {
            dtC = DAL_Class_getData();
        }
        catch
        {
        }
        return dtC;
    }
    public DataTable Class_getSearch(string user, string name)
    {
        try
        {
            dtC = DAL_Class_getSearch(user, name);
        }
        catch
        {
        }
        return dtC;
    }
    public Boolean Class_Update(DTO_Class objC)
    {
        try
        {

            if (DAL_Class_Update(objC))
            {
                return true;
            }
            else
            {
                return false;
            }
        }
        catch
        {
            return false;
        }
    }
    public Boolean Class_Insert(DTO_Class objC)
    {
        try
        {

            if (DAL_Class_Insert(objC))
            {
                return true;
            }
            else
            {
                return false;
            }
        }
        catch
        {
            return false;
        }
    }
}